/* tslint:disable */
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';

import * as OrmModels from './models';
import * as models from '../models';
<% if (isIo === 'enabled') { %>
import { RealTime } from '../services';
<% } %>

@Injectable()
export class Orm {
<% for (var modelName in models) {
  var meta = models[modelName];
  // capitalize the model name
  modelName = modelName[0].toUpperCase() + modelName.slice(1);
-%>
  public <%- modelName %>: OrmModels.Orm<%- modelName %>;
<% } // for modelName in models -%>

  constructor(public store: Store<any><% if (isIo === 'enabled') { %>, protected realTime?: RealTime<% } %>) {
<% for (var modelName in models) {
  var meta = models[modelName];
  // capitalize the model name
  modelName = modelName[0].toUpperCase() + modelName.slice(1);
-%>
    this.<%- modelName %> = new OrmModels.Orm<%- modelName %>(store<% if (isIo === 'enabled') { %>, realTime<% } %>);
<% } // for modelName in models -%>
  }
}
